package com.java.huxb.day03.utils;

import com.java.huxb.day03.entity.People;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author huxb
 * @date 2020/3/3 0003 下午 8:57
 */
public class PeopleUtils {


    public  static List<People> getPeopleList (List<String> userIdList) {
        List<People> peopleList = new ArrayList<>(10);

        for (int i = 5 ; i < 15; i++) {
            peopleList.add(new People(i + "", "用户" +  i));
        }
        return  peopleList.stream().filter(people -> userIdList.contains(people.getUserId())).collect(Collectors.toList()) ;
    }
}
